
#include "Library.h"

//CROSSROADS

// GLOBAL VARIABLES

bool glcomplete = false;
bool fcomplete = false;
bool scomplete = false;
bool gcomplete = false;
bool ccomplete = false;

PLAYER player;


bool Crossroads()
{
	//set player default values

	cout << "What is your name hero?\n";
	char name[32];
	cout << ">";
	cin.getline(name,32,'\n');
	
	cout << "\n\n";
	

	int choice = 0;

	while (choice != 6)
	{
		cout << "You stand at the center of several roads going off in many directions.\n";
		cout << "There is a small town behind you full of shops and people.\n\n";

		cout << "Which path do you choose?\n";
		cout << "1: Town\n";
		cout << "2: Summoning Portal\n";
		cout << "3: Arbek Village\n";
		/*
		the actual quests have to be programmed yet, a lot of work is needed.
		If you want, you can
		there are quest files in the project
		concept quests
		*/
		
		cout << "4: View Players Stats\n";
		cout << "5: Exit Game\n";
		cout << "6:About\n";
		cout << ">";

		cin >> choice;
		cin.clear();
		cin.ignore(INT_MAX,'\n');

		cout << "\n";

		switch (choice)
		{
		case 1:
			{
				Town(&player);
				break;
			}
		case 2:
			{
				//determine which level the player is on
				int level = 1;
				if (glcomplete)
					level = 2;
				else if (fcomplete)
					level = 3;
				else if (scomplete)
					level = 4;

				SummonPortal(&player,level);
				break;
			}
		case 3:
			{
			 ArbekVillage(&player);	
				break;
			}
		case 4:
			{
				//if (glcomplete && !fcomplete)
					//Forest();
				break;
			}
		
		case 5:
			{
				//quit
				break;
			}
		case 6:
			{
				cout << "Credits\n";
				cout << "Adil-Lead dev\n";
				cin.get();
				break;
			}
		default:
			{
				choice = -1;
			}break;
		}

	}

	return true;
}
